package com.glela.live.service.impl;

import com.glela.live.dao.LiveRoomFollowDao;
import com.glela.live.model.LiveRoomFollow;
import com.glela.live.service.LiveRoomFollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LiveRoomFollowServiceImpl implements LiveRoomFollowService{

    @Autowired
    private LiveRoomFollowDao liveRoomFollowDao;

    @Override
    public LiveRoomFollow addLiveRoomFollow(LiveRoomFollow liveRoomFollow) {
        int count = liveRoomFollowDao.addLiveRoomFollow(liveRoomFollow);
        if (count>0){
            return liveRoomFollow;
        }
        return null;
    }

    @Override
    public int delLiveRoomFollow(LiveRoomFollow liveRoomFollow) {
        return liveRoomFollowDao.delLiveRoomFollow(liveRoomFollow);
    }
}
